package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import vista.JBienvenida;

public class ControladorBienvenida implements ActionListener{

	private JBienvenida VentanaBienvenida;
	private String nivel;
	
	public ControladorBienvenida(){
		this.VentanaBienvenida = new JBienvenida();
		this.VentanaBienvenida.AddListener(this);
		this.VentanaBienvenida.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent e) {
		if(e.getActionCommand().equals("Empezar")){
			new ControladorPartida();
			this.VentanaBienvenida.setVisible(false);
		}
		else if(e.getActionCommand().equals("Salir")){
			System.exit(0);
		}
		else if(e.getActionCommand().equals("Nivel Basico")){
			nivel = "Basico";
			new ControladorConsulta(nivel);
		}
		else if(e.getActionCommand().equals("Nivel Intermedio")){
			nivel = "Intermedio";
			new ControladorConsulta(nivel);
		}
		else if(e.getActionCommand().equals("Nivel Avanzado")){
			nivel = "Avanzado";
			new ControladorConsulta(nivel);
		}
	}
	
}
